Drops another libgsystem use, and as bonus we malloc less too.
Closes: #311
Approved by: jlebon
-Subproject commit 3d162e772db80f6664a78583268150d2e1d1d29e
+Subproject commit afe3c3a86178c29ceaa3a5e46397ab2fa97202b3
GError **error)
{
gboolean ret = FALSE;
- g_autofree char *tmpname = NULL;
+ char *tmpname = g_strdup ("tmplink.XXXXXX");
guint i;
const int max_attempts = 128;
for (i = 0; i < max_attempts; i++)
{
- g_free (tmpname);
- tmpname = gs_fileutil_gen_tmp_name (NULL, NULL);
+ glnx_gen_temp_name (tmpname);
if (symlinkat (target, tmp_dirfd, tmpname) < 0)
{
if (errno == EEXIST)